﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XNA_TD
{
    public class GeldUeberZeit : IRunable, IGameUpdate
    {
        private long lastInGameTime;

        public GeldUeberZeit()
            : base(Priority.Logic)
        {
            Register(this);
        }

        public void GameUpdate()
        {
            while (lastInGameTime <= inGameTime)
            {
                lastInGameTime += 1000;
                geld += 1;
            }
        }

        public override void Load()
        {
            lastInGameTime = inGameTime;
        }

        public override void UnLoad()
        {
        }
    }
}
